<?php 
/* SVN FILE: $Id$ */
/* User Test cases generated on: 2009-05-18 13:05:14 : 1242666794*/
App::import('Model', 'User');

class UserTestCase extends CakeTestCase {
	var $User = null;
	var $fixtures = array('app.user', 'app.user_address', 'app.user', 'app.cart', 'app.account_log', 'app.admin_log', 'app.booking_good', 'app.cart', 'app.collect_good', 'app.comment', 'app.feedback', 'app.member_log', 'app.order_info', 'app.snatch_log', 'app.tag', 'app.user_account', 'app.user_address', 'app.user_bonus', 'app.user');

	function startTest() {
		$this->User =& ClassRegistry::init('User');
	}

	function testUserInstance() {
		$this->assertTrue(is_a($this->User, 'User'));
	}

	function testUserFind() {
		$this->User->recursive = -1;
		$results = $this->User->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('User' => array(
			'id'  => 1,
			'user_name'  => 'Lorem ipsum dolor sit amet',
			'password'  => 'Lorem ipsum dolor sit amet',
			'email'  => 'Lorem ipsum dolor sit amet',
			'question'  => 'Lorem ipsum dolor sit amet',
			'answer'  => 'Lorem ipsum dolor sit amet',
			'sex'  => 1,
			'birthday'  => '2009-05-18 13:13:14',
			'user_money'  => '2009-05-18 13:13:14',
			'frozen_money'  => '2009-05-18 13:13:14',
			'pay_points'  => 1,
			'rank_points'  => 1,
			'reg_time'  => '2009-05-18 13:13:14',
			'last_login'  => '2009-05-18 13:13:14',
			'last_time'  => '2009-05-18 13:13:14',
			'last_ip'  => 'Lorem ipsum d',
			'visit_count'  => 1,
			'user_rank'  => 1,
			'is_special'  => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida,phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam,vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit,feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'salt'  => 'Lorem ip',
			'flag'  => 1,
			'alias'  => 'Lorem ipsum dolor sit amet',
			'MSN'  => 'Lorem ipsum dolor sit amet',
			'QQ'  => 'Lorem ipsum dolor ',
			'office_phone'  => 'Lorem ipsum dolor ',
			'home_phone'  => 'Lorem ipsum dolor ',
			'mobile_phone'  => 'Lorem ipsum dolor ',
			'is_validated'  => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida,phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam,vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit,feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'credit_line'  => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida,phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam,vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit,feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'user_address_id'  => 1,
			'user_id'  => 1
		));
		$this->assertEqual($results, $expected);
	}
}
?>